// PartBHConstructor.cpp: implementation of the PartBHConstructor class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PartBHConstructor.h"
#include "Part.h"
#include "PartCrudeDataSet.h"
#include "PersistentFacade.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

IMPLEMENT_DYNAMIC_CREATE(PartBHConstructor, FunctionObject, FunctionObject::eBHCONSTRUCT)

PartBHConstructor::PartBHConstructor()
{

}

PartBHConstructor::~PartBHConstructor()
{

}

BOOL PartBHConstructor::Execute()
{
	PartCrudeDataSet* pCrudeSet = GetOwner()->GetPersistentFacade()->GetPartCrudeDataSet();
	pCrudeSet->SetDataStandard(GetOwner()->GetStandard());
	BOOL bResult = pCrudeSet->InstancePart(GetOwner(), GetOwner()->GetBH());
	pCrudeSet->Close();
	return bResult;
}